package com.example.springbootdemo.beandefinationregister;

import com.example.springbootdemo.beandefinationregister.mapper.TestMapper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class BeanDefinitionRegisterDemo {

    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext = SpringApplication.run(BeanDefinitionRegisterDemo.class, args);

        TestMapper testMapper = (TestMapper) applicationContext.getBean("testMapper");
        testMapper.test();
    }
}
